package ae.pcfc.cldos.online.common.clddb.dao.provider;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;

import ae.pcfc.cldos.online.common.clddb.dao.TaskMasterDAO;
import ae.pcfc.cldos.online.common.clddb.domain.TaskMaster;
import ae.pcfc.cldos.online.common.dao.GenericDAO;

/**
 * 
 * @author arosa
 *
 */
@Repository
public class TaskMasterDAOImpl extends GenericDAO implements TaskMasterDAO{
	
	public TaskMaster findTaskMasterByName(String name){
		DetachedCriteria criteria = DetachedCriteria.forClass(TaskMaster.class);
		criteria.add(Restrictions.eq(TaskMaster.__TASK_NAME, name).ignoreCase());
		return findByCriteria(criteria);
	}
}
